package com.feng.profile.vo;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author Lee
 */
public class LoginVo implements Serializable {

    @NotNull
    private String userName;

    @NotNull
    private String password;

    @NotNull
    private String kaptcha;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getKaptcha() {
        return kaptcha;
    }

    public void setKaptcha(String kaptcha) {
        this.kaptcha = kaptcha;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof LoginVo)) return false;

        LoginVo loginVo = (LoginVo) o;

        if (!userName.equals(loginVo.userName)) return false;
        if (!password.equals(loginVo.password)) return false;
        return kaptcha.equals(loginVo.kaptcha);
    }

    @Override
    public int hashCode() {
        int result = userName.hashCode();
        result = 31 * result + password.hashCode();
        result = 31 * result + kaptcha.hashCode();
        return result;
    }

    @Override
    public String toString() {
        return "LoginVo{" +
                "userName='" + userName + '\'' +
                ", password='" + password + '\'' +
                ", kaptcha='" + kaptcha + '\'' +
                '}';
    }
}
